# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Gabriel Martinez < reitaka at gmail dot com >

pkgname=usbmuxd
pkgver=1.1.0+28+g46bdf3e
pkgrel=1
pkgdesc="USB Multiplex Daemon"
url="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
arch=('i686' 'x86_64')
license=('GPL2' 'GPL3')
depends=('libimobiledevice')
makedepends=('git')
install=usbmuxd.install
_commit=46bdf3ec90acf3916ee8aba622a7da9da5eb8e06  # master
source=("git+https://github.com/libimobiledevice/usbmuxd#commit=$_commit")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd $pkgname
  make check
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
